Fix add_clips leaving stranded audio when overwriting linked clips#124
Open
PriyeshPandey2000 wants to merge 1 commit into
Open
Fix add_clips leaving stranded audio when overwriting linked clips#124PriyeshPandey2000 wants to merge 1 commit into
PriyeshPandey2000 wants to merge 1 commit into
Conversation
PriyeshPandey2000
force-pushed
the
fix/add-clips-stranded-linked-audio
branch
2 times, most recently
from
June 26, 2026 04:07
349e77b to
4b776e1
Compare
TimLai666
added a commit
to TimLai666/fronda
that referenced
this pull request
Jul 10, 2026
First-ever complete inventory (207 PRs / 79 issues). Multicam passthrough already landed; tool-surface v2 (palmier-io#263) flagged as a user decision; two verified-in-Rust bugs (palmier-io#263 ripple fixpoint, palmier-io#124 stranded audio) and three UNVERIFIED checks queued. Also drops the now-unused GenerationInput lib import.
TimLai666
added a commit
to TimLai666/fronda
that referenced
this pull request
Jul 10, 2026
…ruption bugs, palmier-io#264 overflow ceiling, palmier-io#36/palmier-io#268 ports, palmier-io#139/palmier-io#212 verified TDD per item (RED repro first, then fix): palmier-io#124 (BUG-FIXED): place_clips overwriting a linked V+A pair cleared only the target track — the audio partner's range stayed (double playback) and new linked audio was pushed onto a spurious extra track. Now a video-track overwrite clears the same range on linked-partner tracks (mirrors Swift PR 4b776e1's video-gated semantics); audio-track placement stays track-local. palmier-io#263 (BUG-FIXED): compute_ripple_delete partner propagation only scanned the anchor track, so linked partners of clips on cleared sync-locked tracks were left behind on lock-off tracks (desync). Propagation is now a worklist fixpoint across ALL cleared tracks; palmier-io#227 sync-follower and palmier-io#207 ignore-set semantics unchanged. palmier-io#264/palmier-io#265 (BUG-FIXED): near-i64::MAX frame/duration args crashed the process (debug 'attempt to add with overflow' in insert/move/apply_layout/add_texts; set_clip_properties silently stored poisoned values). Shared MAX_TOOL_FRAME (1e9, upstream maxToolFrame) + require_frame_in_bounds in mutation.rs, wired into both the mutation validators and the executor's live arg parsing (resolve_placement, insert_clips frame incl. >=0 guard, move_clips toFrame, split_clips atFrame/frames, set_clip_properties duration/trims, apply_layout, add_texts). ripple_delete_ranges stays clamp-tolerant like upstream. palmier-io#139 (VERIFIED-OK): format_timecode already uses drop-adjusted divisors (1798/17982); frame 1800 @29.97DF = 00;01;00;02 pre-existing test confirmed, 10-minute-boundary assertions added (17982 -> 00;10;00;00). palmier-io#212 (VERIFIED-OK + guard): speed 0.1 legal end-to-end, duration math pinned (150f @1.0 -> 1500f @0.1). Fixed the live executor silently storing speed <= 0 — now rejects 'speed must be > 0' like Swift. palmier-io#36 (PORTED): AnthropicConfig::from_env honours ANTHROPIC_BASE_URL (trimmed, blank falls back to the public API); chat_view uses it; URL construction unit-tested via pure resolve_base_url. palmier-io#268 (PORTED): sonnet5-family requests carry output_config.effort=low (shape from upstream AgentClientTypes.swift), applied in build_agent_request AND the live run_agent_turn body; snapshot + ScriptedTransport tests. Gates (exit code 0): cargo test --workspace; cargo test -p fronda-app-shell-gpui --features desktop-app; cargo check -p fronda-app-shell-gpui --features desktop-app --bin fronda.
TimLai666
added a commit
to TimLai666/fronda
that referenced
this pull request
Jul 10, 2026
All 8 items verdicted: palmier-io#124 stranded audio + palmier-io#263 ripple fixpoint BUG-FIXED (TDD, upstream-diff-matched), palmier-io#139 drop-frame + palmier-io#212 speed VERIFIED-OK (with boundary pins + a speed<=0 guard), palmier-io#264 overflow ceiling + palmier-io#36 base URL + palmier-io#268 sonnet5 effort:low PORTED. 19 new tests. Residuals flagged: mutation.rs is a dormant validation layer (live path never calls it - palmier-io#144's checks included), and cmd_add_texts ignores startFrame (chip task_14403ebd).
clearRegion calls splitClip (which splits linked partners on both tracks) then removeClips (which only removes the given clip id). When add_clips overwrites a linked V+A pair, the audio fragment in the cleared range is never removed. placeClip then finds the audio track occupied and creates a spurious second audio track, causing the original audio to play under the new clip. Fix collects linked partner track IDs before clearing the video track, then issues a second clearRegion on each partner track. placeClip finds the audio track clear and routes the new audio there correctly.
PriyeshPandey2000
force-pushed
the
fix/add-clips-stranded-linked-audio
branch
from
July 21, 2026 10:22
4b776e1 to
692bd2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clearRegion calls splitClip (which splits linked partners on both tracks) then removeClips (which only removes the given clip id). When add_clips overwrites a linked V+A pair, the audio fragment in the cleared range is never removed. placeClip then finds the audio track occupied and creates a spurious second audio track, causing the original audio to play under the new clip.
Fix collects linked partner track IDs before clearing the video track, then issues a second clearRegion on each partner track. placeClip finds the audio track clear and routes the new audio there correctly.
Note
Medium Risk
Changes agent timeline mutation behavior for linked V+A overwrites; scope is narrow with a targeted regression test, but incorrect partner detection could clear wrong tracks.
Overview
Fixes add_clips overwriting a linked video+audio span so linked audio in the cleared range is removed instead of left behind.
Before placing each clip, when the target track is video, the handler gathers linked partner track IDs for clips overlapping the placement range, runs clearRegion on the video track, then runs clearRegion on each partner track for the same frame range. That avoids stranded audio after clearRegion splits linked partners but only removes fragments on the track being cleared— which previously caused double playback and an extra audio track when placeClip saw A1 still occupied.
Adds regression test addClipsClearsLinkedAudioWhenOverwritingLinkedPair for middle-overwrite of a linked V+A pair.
Reviewed by Cursor Bugbot for commit 692bd2c. Bugbot is set up for automated code reviews on this repo. Configure here.